# 数据库相关配置
# 需要根据自己数据库的账号密码修改相关值
TYPE = "mysql+pymysql"
USERNAME = "root"
PASSWORD = "123456"
HOST = "127.0.0.1"
PORT = "3306"
DATABASE = "flask_books"


class Config:
    # 数据库URL
    SQLALCHEMY_DATABASE_URI = "{}://{}:{}@{}:{}/{}".format(TYPE, USERNAME, PASSWORD, HOST, PORT, DATABASE)
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    # 邮箱配置
    MAIL_SERVER = "smtp.qq.com"
    MAIL_USE_SSL = True
    MAIL_PORT = 465
    MAIL_USERNAME = "66752878@qq.com"
    MAIL_PASSWORD = "onlemsvvzauzbhii"
    MAIL_DEFAULT_SENDER = "66752878@qq.com"

    # 安全密钥配置
    SECRET_KEY = "adikqahjbdsjkndbaskjdksadjnhjsaj"
